home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / comm / wnos5src.zip / SLIP.H < prev    next >
Text File  |  1993-08-09  |  1KB  |  42 lines

  1. #ifndef    _SLIP_H
  2. #define _SLIP_H
  3.  
  4. #ifndef _GLOBAL_H
  5. #include "global.h"
  6. #endif
  7.  
  8. #define SLIP_MAX         5        /* Maximum number of slip channels */
  9.  
  10. /* SLIP definitions */
  11. #define    FR_END            0300    /* Frame End */
  12. #define    FR_ESC            0333    /* Frame Escape */
  13. #define    T_FR_END        0334    /* Transposed frame end */
  14. #define    T_FR_ESC        0335    /* Transposed frame escape */
  15.  
  16. /* Slip protocol control structure */
  17. struct slip {
  18.     struct iface *iface;
  19.     char escaped;                /* Receiver State control flag */
  20. #define    SLIP_FLAG        0x01
  21. #define    SLIP_VJCOMPR    0x02
  22.     struct mbuf *rbp;            /* Head of mbuf chain being filled */
  23.     struct mbuf *rbp1;            /* Pointer to mbuf currently being written */
  24.     char *rcp;                    /* Write pointer */
  25.     int16 rcnt;                    /* Length of mbuf chain */
  26.     struct mbuf *tbp;            /* Transmit mbuf being sent */
  27.     int16 errors;                /* Receiver input errors */
  28.     int type;                    /* Protocol of input */
  29.     int (*send)(int,struct mbuf *);    /* Routine to send mbufs */
  30.     int (*get)(int);            /* Routine to fetch input chars */
  31.     struct iface *kiss[16];        /* multiport kiss AX25 only - G1EMM */
  32. };
  33.  
  34. extern struct slip Slip[];
  35.  
  36. /* In slip.c: */
  37. void asy_rx __ARGS((int dev,void *p1,void *p2));
  38. int slip_raw __ARGS((struct iface *iface,struct mbuf *data));
  39. int slip_send __ARGS((struct mbuf *bp,struct iface *iface,int32 gateway,int prec,int del,int tput,int rel));
  40.  
  41. #endif    /* SLIP_ALLOC */
  42.